<!DOCTYPE html>
<html lang="zh-CN"><head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>订单查询 - 康雅国际物流</title>
    <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, width=device-width">
    <link rel="stylesheet" type="text/css" href="{EW_DELIVERT_STATIC}css/common.css">
    <link rel="stylesheet" type="text/css" href="{EW_DELIVERT_STATIC}css/mbase_v4.css">
    <link rel="stylesheet" type="text/css" href="{EW_DELIVERT_STATIC}css/query_v4.css">
    <script src="{EW_DELIVERT_STATIC}js/jquery.js"></script>
</head>

<body>
    <div class="kd-content" id="content" >
        <section class="com-info">
          <div class="info1 hidden" style="display: block;"><a class="a-changecom"><img id="comImg" class="hidden" alt="雅康物流" src="{EW_DELIVERT_STATIC}image/icon.jpg" style="display: inline;"></a><select id="comSelect"></select></div>
          <div class="info2 input-box">
            <form id="detailForm">
              <input type="text" id="queryInput" class="num-inp" name="orderId" placeholder="请输入快递单号" autocomplete="off" value="<?php echo $_GPC['orderId']?>">
              <a class="query-btn">查询</a>
              <div class="clear-x hide" id="clearBtn"></div>
            </form>
          </div>
        </section>
        <div class="loading hidden" id="loadingBox" style="display: none;">
          <div class="loading-box">
            <p><img class="img-loading" src="https://cdn.kuaidi100.com/images/smart/order/loading.gif"></p>
            <p id="loadingText">奋力加载中</p>
          </div>
        </div>
        <section class="result-box hidden" id="resultBox" style="display: block;">
          <div class="result-success" id="success">
            <div class="result-top" id="resultTop">
              <span id="sortSpan" class="col1-up" title="切换排序">时间</span>
              <span class="col2">地点和跟踪进度</span>
            </div>
            <ul id="result" class="result-list">

                <?php foreach($details as $k=> $detail):?>

                <li class="<?php if($k == 0){echo 'first';}?>">
                    <div class="col1">
                        <dl>
                            <!-- <dt>2017.12.07</dt> -->
                            <dt><?php echo date('Y.m.d' , $detail['createdAt']);?></dt>
                            <!-- <dd>16:31</dd> -->
                            <dd><?php echo date('H:i' , $detail['createdAt']);?></dd>
                        </dl>
                    </div>
                    <div class="col2">
                        <span class="step">
                            <span class="line2"></span>
                            <span class="point"></span>
                        </span>
                    </div>
                    <div class="col3"><?php echo $detail['progress']?></div>
                </li>

                <?php endforeach;?>
            </ul>
        </section>


      </div>

<script>
  $('#clearBtn').click(function(){
    $('#queryInput').val('');
  });

  $('#queryInput').change(function(event) {
      if($('#queryInput').val() == ''){
        $('#clearBtn').addClass('hide');
      }
      $('#clearBtn').removeClass('hide');
  });

  $('.query-btn').click(function(){
    var orderId = $('#queryInput').val();
    window.location = "{php echo $this->createMobileUrl('detail')}&orderId=" + orderId;
  });
</script>
</body>


</html>